.class public Lcom/xingbook/park/view/PaintThumbView;
.super Landroid/widget/LinearLayout;


# instance fields
.field a:Landroid/widget/HorizontalScrollView;

.field private b:Landroid/widget/Adapter;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0

    invoke-direct {p0, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 0

    invoke-direct {p0, p1, p2}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    return-void
.end method


# virtual methods
.method public a(I)V
    .locals 4

    const/4 v3, 0x0

    iget-object v0, p0, Lcom/xingbook/park/view/PaintThumbView;->b:Landroid/widget/Adapter;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/park/view/PaintThumbView;->b:Landroid/widget/Adapter;

    const/4 v1, 0x1

    const/4 v2, 0x0

    invoke-interface {v0, v1, v2, p0}, Landroid/widget/Adapter;->getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, v3, v3}, Landroid/view/View;->measure(II)V

    invoke-virtual {v0}, Landroid/view/View;->getMeasuredWidth()I

    move-result v0

    add-int/lit8 v0, v0, 0x3

    iget-object v1, p0, Lcom/xingbook/park/view/PaintThumbView;->a:Landroid/widget/HorizontalScrollView;

    new-instance v2, Lcom/xingbook/park/view/j;

    invoke-direct {v2, p0, v0, p1}, Lcom/xingbook/park/view/j;-><init>(Lcom/xingbook/park/view/PaintThumbView;II)V

    invoke-virtual {v1, v2}, Landroid/widget/HorizontalScrollView;->post(Ljava/lang/Runnable;)Z

    :cond_0
    return-void
.end method

.method public a(Landroid/widget/Adapter;Landroid/widget/HorizontalScrollView;)V
    .locals 8

    const/4 v7, 0x0

    const/16 v6, 0x8

    const/4 v5, 0x3

    const/4 v1, 0x0

    const/4 v4, -0x2

    iput-object p1, p0, Lcom/xingbook/park/view/PaintThumbView;->b:Landroid/widget/Adapter;

    iput-object p2, p0, Lcom/xingbook/park/view/PaintThumbView;->a:Landroid/widget/HorizontalScrollView;

    move v0, v1

    :goto_0
    invoke-interface {p1}, Landroid/widget/Adapter;->getCount()I

    move-result v2

    if-lt v0, v2, :cond_0

    return-void

    :cond_0
    invoke-interface {p1, v0, v7, v7}, Landroid/widget/Adapter;->getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v2

    invoke-virtual {v2, v5, v6, v5, v6}, Landroid/view/View;->setPadding(IIII)V

    invoke-virtual {p0, v1}, Lcom/xingbook/park/view/PaintThumbView;->setOrientation(I)V

    new-instance v3, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v3, v4, v4}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {p0, v2, v3}, Lcom/xingbook/park/view/PaintThumbView;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    add-int/lit8 v0, v0, 0x1

    goto :goto_0
.end method
